<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/Mall_receipt.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_receipt.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '商户开票信息',
                    name: 'Mall_receipt',
                    url: "/Mall_receipt/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {"merchant_Code":"","merchantName":"","payee":"","receiptName":"","salerAccount":"","salerAddress":"","salerTaxNum":"","salerTel":"","showCheckerType":"",clerk:"",isAvailable:"",showBankAccountType:"",appsecret: '',appkey: '',InvoicingName: '',Merchant: ''},
                editFormOptions: [
                              [{"title":"开票信息配置名称","field":"InvoicingName","type":"text",required: true},
                               {"title":"商户名称","field":"merchant_Code","type":"select",dataKey: 'Merchants',data: [],required: true}],
                              [{"title":"税号","field":"salerTaxNum","type":"text",required: true},
                               {"title":"公司名称","field":"receiptName","type":"text"}],
                              [{"title":"银行开户行及账号","field":"salerAccount","type":"text", width: 130},
                               {"title":"地址","field":"salerAddress","type":"text"}],
                              [{"title":"开票员","field":"clerk","type":"text",required: false},
                               {"title":"电话","field":"salerTel","type":"phone"}],
                              [
                                // {"title":"是否可用","field":"isAvailable","type":"switch",colSize:4},
                              {"title":"数电普票和数电专票","field":"showBankAccountType","type":"select",dataKey: 'showBankAccountType',data: [],colSize:8,width: 220},
                              {"title":"复核人","field":"checker","type":"text"}],
                              [{"title":"是否展示收款人和复核人","field":"showCheckerType","type":"switch",width: 160},{"title":"收款人","field":"payee","type":"text"},
                              ],
                              [{"title":"appkey","field":"appkey","type":"text"},
                              {"title":"appsecret","field":"appsecret","type":"text"},]
                            ],
                searchFormFields: {"merchantName":""},
                searchFormOptions: [[{"title":"商户名称","field":"merchantName","type":"like"}]],
                columns: [
                      {field:'InvoicingName',title:'开票信息配置名称',type:'string',width:220,align:'left'},
                      {field:'merchant_Code',title:'商户名称',type:'string',width:220,align:'left',bind:{ key:'Merchants',data:[]}},
                      {field:'salerTaxNum',title:'税号',type:'string',width:220,align:'left'},
                       {field:'receiptName',title:'公司名称',type:'string',width:220,align:'left'},
                       {field:'salerAccount',title:'银行开户行及账号',type:'string',width:220,align:'left'},
                       {field:'appkey',title:'appkey',type:'string',width:220,align:'left'},
                       {field:'appsecret',title:'appsecret',type:'string',width:220,align:'left'},
                       {field:'salerAddress',title:'地址',type:'string',width:220,align:'left'},
                       {field:'salerTel',title:'电话',type:'string',width:220,align:'left'},
                       {field:'clerk',title:'开票员',type:'string',width:120,align:'left'},
                       {field:'payee',title:'收款人',type:'string',width:120,align:'left'},
                       {field:'checker',title:'复核人',type:'string',width:220,align:'left',sortable:true},
                       {field:'showBankAccountType',title:'数电普票和数电专票',type:'int',width:220,align:'left',bind:{ key:'showBankAccountType',data:[]}},
                       {field:'showCheckerType',title:'是否展示收款人和复核人',type:'int',width:190,align:'left',bind:{ key:'enable',data:[]}},
                      //  {field:'isAvailable',title:'是否可用',type:'int',width:90,require:true,align:'left',bind:{ key:'enable',data:[]}},
                       {field:'creator',title:'创建人',type:'string',width:80,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:190,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:190,align:'left',sortable:true},],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
